home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sources.misc
- From: etxerus@james.ericsson.se (Hans Beckerus LG/THB)
- Subject: v29i088: ssh-1.3 - Split & Strip appended shell archives, Patch01
- Message-ID: <1992Apr26.043017.23265@sparky.imd.sterling.com>
- X-Md4-Signature: b9a5ee3b7be6f7288e74896272434f53
- Date: Sun, 26 Apr 1992 04:30:17 GMT
- Approved: kent@sparky.imd.sterling.com
-
- Submitted-by: etxerus@james.ericsson.se (Hans Beckerus LG/THB)
- Posting-number: Volume 29, Issue 88
- Archive-name: ssh-1.3/patch01
- Environment: UNIX
- Patch-To: ssh-1.3: Volume 28, Issue 117
-
- Here is patch 1 for ssh 1.30. It updates version 1.30 to 1.31.
-
- When something went wrong while extracting, the last version tended
- to hang slightly. This has been fixed now. Also, a warning message
- will be displayed when an unexpected end of file is seen.
-
- /Hans
- --
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then unpack
- # it by saving it into a file and typing "sh file". To overwrite existing
- # files, type "sh file -c". You can also feed this as standard input via
- # unshar, or by typing "sh <file", e.g.. If this archive is complete, you
- # will see the following message at the end:
- # "End of shell archive."
- # Contents: patch1 patchlevel.h
- # Wrapped by etxerus@james16 on Wed Apr 22 09:21:58 1992
- PATH=/bin:/usr/bin:/usr/ucb ; export PATH
- if test -f 'patch1' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'patch1'\"
- else
- echo shar: Extracting \"'patch1'\" \(5061 characters\)
- sed "s/^X//" >'patch1' <<'END_OF_FILE'
- X*** ssh.c Tue Apr 21 14:41:41 1992
- X--- ssh.new Wed Apr 22 09:20:45 1992
- X***************
- X*** 1,4 ****
- X! /* @(#)ssh.c 1.30 (HaB) 92/03/17
- X *
- X * NAME:
- X * ssh
- X--- 1,4 ----
- X! /* @(#)ssh.c 1.31 (HaB) 92/04/15
- X *
- X * NAME:
- X * ssh
- X***************
- X*** 35,41 ****
- X * not always work properly.
- X *
- X * DATE:
- X! * 1992-03-17
- X *
- X * AUTHOR:
- X * Hans C. Beckerus
- X--- 35,41 ----
- X * not always work properly.
- X *
- X * DATE:
- X! * 1992-04-15
- X *
- X * AUTHOR:
- X * Hans C. Beckerus
- X***************
- X*** 78,84 ****
- X #endif
- X
- X #ifdef SCCSID
- X! char sccsid[] = "@(#)ssh.c 1.30 (HaB) 92/03/17";
- X #endif
- X
- X enum boolean { /* Boolean constants */
- X--- 78,84 ----
- X #endif
- X
- X #ifdef SCCSID
- X! char sccsid[] = "@(#)ssh.c 1.31 (HaB) 92/04/15";
- X #endif
- X
- X enum boolean { /* Boolean constants */
- X***************
- X*** 131,136 ****
- X--- 131,137 ----
- X int state = SEARCH; /* The current state */
- X int fc = 0; /* File part counter */
- X int extract = FALSE; /* Extract/write flag */
- X+ int hitexit = -1; /* End of part flag */
- X char *s; /* Read line */
- X char fout[7]; /* Output filenames */
- X register j = 0; /* Counter */
- X***************
- X*** 151,157 ****
- X }
- X else if (!(strcmp (*argv, "-v"))) {
- X if (!(argn-1)) { /* Single option */
- X! puts ("ssh v1.30 (bugs to etxerus@james.ericsson.se)");
- X exit (0);
- X }
- X }
- X--- 152,158 ----
- X }
- X else if (!(strcmp (*argv, "-v"))) {
- X if (!(argn-1)) { /* Single option */
- X! puts ("ssh v1.31 (bugs to etxerus@james.ericsson.se)");
- X exit (0);
- X }
- X }
- X***************
- X*** 178,185 ****
- X case SEARCH:
- X for (j = 0; pattern[j][0] != NULL; j++) {
- X if (!(strncasecmp (s, pattern[j], strlen (pattern[j])))) {
- X state = START;
- X! break;
- X }
- X }
- X if (state != START)
- X--- 179,194 ----
- X case SEARCH:
- X for (j = 0; pattern[j][0] != NULL; j++) {
- X if (!(strncasecmp (s, pattern[j], strlen (pattern[j])))) {
- X+ if (!extract)
- X+ hitexit = FALSE;
- X+ else {
- X+ if ((pipe = popen (SHELL, "w")) == NULL) {
- X+ fprintf (stderr, "ssh: Cannot create process.\n");
- X+ exit (1);
- X+ }
- X+ }
- X state = START;
- X! break;
- X }
- X }
- X if (state != START)
- X***************
- X*** 191,203 ****
- X fw = fopen (fout, "w");
- X fprintf (fw, "%s\n", s);
- X }
- X! else {
- X! if ((pipe = popen (SHELL, "w")) == NULL) {
- X! fprintf (stderr, "ssh: Cannot create process.\n");
- X! exit (1);
- X! }
- X fprintf (pipe, "%s\n", s);
- X- }
- X state = INSIDE;
- X break;
- X
- X--- 200,207 ----
- X fw = fopen (fout, "w");
- X fprintf (fw, "%s\n", s);
- X }
- X! else
- X fprintf (pipe, "%s\n", s);
- X state = INSIDE;
- X break;
- X
- X***************
- X*** 206,215 ****
- X if (!extract) {
- X fprintf (fw, "%s\n", s);
- X fclose (fw);
- X }
- X else {
- X fprintf (pipe, "%s\n", s);
- X! pclose (pipe);
- X }
- X state = SEARCH;
- X }
- X--- 210,221 ----
- X if (!extract) {
- X fprintf (fw, "%s\n", s);
- X fclose (fw);
- X+ hitexit = TRUE;
- X }
- X else {
- X fprintf (pipe, "%s\n", s);
- X! if (pclose (pipe))
- X! exit (1);
- X }
- X state = SEARCH;
- X }
- X***************
- X*** 224,227 ****
- X--- 230,238 ----
- X j = 0; /* Reset counter */
- X }
- X }
- X+ if (!extract) {
- X+ if (!hitexit)
- X+ fprintf (stderr, "ssh: Warning, unexpected end of file.\n");
- X+ }
- X+ exit (0);
- X }
- END_OF_FILE
- if test 5061 -ne `wc -c <'patch1'`; then
- echo shar: \"'patch1'\" unpacked with wrong size!
- fi
- # end of 'patch1'
- fi
- if test -f 'patchlevel.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'patchlevel.h'\"
- else
- echo shar: Extracting \"'patchlevel.h'\" \(21 characters\)
- sed "s/^X//" >'patchlevel.h' <<'END_OF_FILE'
- X#define PATCHLEVEL 1
- END_OF_FILE
- if test 21 -ne `wc -c <'patchlevel.h'`; then
- echo shar: \"'patchlevel.h'\" unpacked with wrong size!
- fi
- # end of 'patchlevel.h'
- fi
- echo shar: End of shell archive.
- exit 0
-
- exit 0 # Just in case...
-